#ifndef __GAMEMESSAGE_H__
#define __GAMEMESSAGE_H__

#ifdef __cplusplus
extern "C" {
#endif
#include "utils.h"

typedef void (*message_received_cb)(const char* command, const char* data, int code);
typedef void (*message_status_cb)(const char* status);


int gamemsg_init();
void gamemsg_uninit();
void gamemsg_process();

int gamemsg_connect(const char* serverip, int serverport, const char* version, message_received_cb message_cb, message_status_cb status_cb);
void gamemsg_disconnect(int delay_secs);
void gamemsg_send(const char* command, const char* data, int code);

int64_t gamemsg_get_timestamp_delta();
    
#ifdef __cplusplus
}
#endif
#endif

